<?php

/**
* @Author:  	Daniel Dinh
* @Email:   	webdevelopmentvn@gmail.com
* @Link: 		http://joomsoft.net
* @Version: 	1.0
* @copyright:	Joomsoft.net
* @license:		GNU Lesser GPL
*/

// no direct access
defined('_JEXEC') or die;
?>
<script>
	var mess = Array();
	mess[0] = '<?php echo JText::_("COM_FARMACITY_PERIOD_ALERT_NAME");?>';
	mess[1] = '<?php echo JText::_("COM_FARMACITY_PERIOD_ALERT_FROM");?>';
	mess[2] = '<?php echo JText::_("COM_FARMACITY_PERIOD_ALERT_TO");?>';
</script>
<div class="fe_form">
<h3>
	<?php 
		if($this->item->id)
			echo JText::_("COM_FARMACITY_PERIOD_NEW");
		else
			echo JText::_("COM_FARMACITY_PERIOD_NEW");
	?>
</h3>

<form action="<?php echo JRoute::_('index.php?option=com_farmacity&layout=edit&id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="client-form">
<table class="adminform">
	<tbody>
		<?php foreach($this->form->getFieldset() as $field): 
			if($field->name!="id_user"):?>
			<tr>
				<td width="15%"><?php echo $field->label;?></td>
				<td><?php echo $field->input;?></td>
			</tr>
		<?php 
		endif;
		endforeach; ?>
			<tr>
				<td colspan="2" align="right" >
					<input type="submit" value="<?php echo JTEXT::_("COM_FARMACITY_BUTTON_SAVE");?>" onclick="return periodSubmit('period.save',mess);"  class="fe_button"/>
					<input type="submit" value="<?php echo JTEXT::_("COM_FARMACITY_BUTTON_CANCEL");?>" onclick="return periodSubmit('period.cancel',mess);"   class="fe_button"/>
				</td>
			</tr>
	</tbody>	
	</table>	
	<input type="hidden" name="task" value="period.edit" />
	<input type="hidden" value="<?php echo $this->user->id;?>" id="jform_id_user" name="jform[id_user]">
	<?php echo JHtml::_('form.token'); ?>
</form>
</div>